package com.model;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * TGrade entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "T_grade", schema = "")
public class TGrade implements java.io.Serializable {

	// Fields

	private String gradeId;
	private String id;
	private String gradeName;
	private String isEnable;
	private Set<TClass> TClasses = new HashSet<TClass>(0);

	// Constructors

	/** default constructor */
	public TGrade() {
	}

	/** minimal constructor */
	public TGrade(String gradeId) {
		this.gradeId = gradeId;
	}

	/** full constructor */
	public TGrade(String gradeId, String id, String gradeName, String isEnable, Set<TClass> TClasses) {
		this.gradeId = gradeId;
		this.id = id;
		this.gradeName = gradeName;
		this.isEnable = isEnable;
		this.TClasses = TClasses;
	}

	// Property accessors
	@Column(name = "gradeID", unique = true, nullable = false)
	public String getGradeId() {
		return this.gradeId;
	}

	public void setGradeId(String gradeId) {
		this.gradeId = gradeId;
	}
	@Id
	@Column(name = "id")
	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@Column(name = "gradeName")
	public String getGradeName() {
		return this.gradeName;
	}

	public void setGradeName(String gradeName) {
		this.gradeName = gradeName;
	}

	@Column(name = "isEnable")
	public String getIsEnable() {
		return this.isEnable;
	}

	public void setIsEnable(String isEnable) {
		this.isEnable = isEnable;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "TGrade")
	public Set<TClass> getTClasses() {
		return this.TClasses;
	}

	public void setTClasses(Set<TClass> TClasses) {
		this.TClasses = TClasses;
	}

}